package com.linked.store.label.bean.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linked.store.label.bean.param.AddLabelInfoParam;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author :dbq
 * @date : 2023/3/23 15:05
 * @description : desc
 */
@Data
@TableName("store_label_info")
public class LabelInfoPO {

    @TableId(value = "label_id", type = IdType.ASSIGN_UUID)
    private String labelId;
    @TableField("label_name")
    private String labelName;

    @TableField("label_type")
    private Integer labelType;
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @TableField("data_status")
    private Integer dataStatus;

    public LabelInfoPO(AddLabelInfoParam param) {
        this.labelName = param.getLabelName();
        this.labelType = param.getLabelType();
    }
}
